define(["jquery"],function($){
	var tpl = {};

	tpl.init = function(){
		var html = "";
		html += info();
		return html;
	};
	tpl.performance = function(){
		var html = "";
		html += performance();
		return html;
	};
	tpl.guideList = function(){
		var html = "";
		html += guideList();
		return html;
	};
	tpl.guideHideList = function(){
		var html = "";
		html += guideHideList();
		return html;
	};

	var info = function(){
		return 	'<script id="tpl_gmsDetail_info" type="html/text">'+
				'	<div class="panel-body">'+
				'    	<div class="row">'+
				'		  	<div class="form-group col-sm-4 col-md-4 grid-label-2">'+
				'		  		<label class="control-label">姓名：</label>'+
				'		  		<div class="control-input">{{userName}}</div>'+
				'		  	</div>'+
				'		  	<div class="form-group col-sm-4 col-md-4 grid-label-4">'+
				'		  		<label class="control-label">性别：</label>'+
				'		  		<div class="control-input">{{if gender=="F"}}女{{else if gender=="N"}}男{{/if}}</div>'+
				'		  	</div>'+
				'		  	<div class="form-group col-sm-4 col-md-4 grid-label-4">'+
				'		  		<label class="control-label">出生日期：</label>'+
				'		  		<div class="control-input">{{birthday}}</div>'+
				'		  	</div>'+
				'		</div>'+
				'		<div class="row">'+
				'			<div class="form-group col-sm-4 col-md-4 grid-label-2">'+
				'		  		<label class="control-label">孕周：</label>'+
				'		  		<div class="control-input">{{week}}</div>'+
				'		  	</div>'+
				'		  	<div class="form-group col-sm-4 col-md-4 grid-label-4">'+
				'		  		<label class="control-label">出生周龄：</label>'+
				'		  		<div class="control-input">{{age}}</div>'+
				'		  	</div>'+
				'		  	<div class="form-group col-sm-4 col-md-4 grid-label-4">'+
				'		  		<label class="control-label">记录体位：</label>'+
				'		  		<div class="control-input">'+
				'					<select class="form-control input-sm" id="posture">'+
				'						<option value="纵向体位">纵向体位</option>'+
				'						<option value="仰卧位">仰卧位</option>'+
				'					</select>'+
				'		  		</div>'+
				'		  	</div>'+
				'		</div>'+
				'  	</div>'+
				'</script>';
	};

	var performance = function(){
		return 	'<script id="performance-tpl" type="html/text">'+
				'{{each data as value,i}}'+
				'<span {{if !value.status}} class="grey" disabled {{else}} style="background:{{value.itemColor}};cursor:pointer;"{{/if}} item = "{{value.item}}" >{{value.item}}</span>'+
				'{{/each}}'+
			'</script>';
	};

	var guideList = function(){
		return 	'<script id="guideList-tpl" type="html/text">'+
				'{{each data as value,i}}'+
					'{{if i < 3}}'+
					'<span class="guide-label" guideId = "{{value.id}}" guide ="{{value.guide}}">{{value.testDate}}</span>'+
					'{{/if}}'+
				'{{/each}}'+
				'{{if length > 3}}'+
				'<span class="guide-label guide-tab"><i class="fa fa-ellipsis-h" aria-hidden="true"></i></span>'	+
				'{{/if}}'+
				'</script>';
	};
	var guideHideList = function(){
		return 	'<script id="guideHideList-tpl" type="html/text">'+
			'{{each data as value,i}}'+
			'<span class="guide-label guide-hide-label" guideId = "{{value.id}}" guide ="{{value.guide}}">{{value.testDate}}</span>'+
			'{{/each}}'+
			'</script>';
	};

	var printInfo = function(){
		return 	'<script id="printInfo-tpl" type="html/text">'+
				'<li>姓名：{{userName}}</li>'+
				'{{if gender == "F" }}'+
				'<li>性别：女</li>'+
				'{{else if gender == "N"}} '+
				'<li>性别：男</li>'+
				'{{/if}}'+
				'<li>出生日期：{{birthday}}</li>'+
				'<li>孕周：{{week}}</li>'+
				'<li>出生周龄：{{age}}</li>'+
				'<li>记录体位：{{posture}}</li>'+
			'</script>';
	};
	return tpl;
});